package com.Sing.Service;

import com.Sing.Dao.LendMapper;
import com.Sing.Pojo.Lend;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;


public class LendServiceImpl implements LendService{

    private LendMapper mapper;
    @Autowired
    public void setMapper(LendMapper mapper) {
        this.mapper = mapper;
    }

    @Override
    public int getCount() {
        return mapper.getCount();
    }

    @Override
    public ArrayList<Lend> queryDataByCheck(String readerNumber, String name, int backType, int status, int limit, int page) {
        return mapper.queryDataByCheck( readerNumber, name, backType, status, limit, page );
    }

    @Override
    public int queryCountByCheck(String readerNumber, String name, int backType, int status) {
        return mapper.queryCountByCheck( readerNumber, name, backType, status );
    }

    @Override
    public boolean modifyStatus( HashMap<String,Object> paramMap ) {
        return mapper.modifyStatus( paramMap );
    }

    @Override
    public boolean insertData(HashMap<String, Object> paramMap) {
        return mapper.insertData( paramMap );
    }

    @Override
    public boolean deleteData(int id) {
        return mapper.deleteData( id );
    }

    @Override
    public boolean updateDataById(HashMap<Object, Object> paramMap) {
        return mapper.updateDataById( paramMap );
    }

    @Override
    public ArrayList<Lend> queryLendListByReaderId(int readerId) {
        return mapper.queryLendListByReaderId( readerId );
    }
}
